let initState = [{id:'001',name:'tom',age:18}]
import {JIAN_PERSON} from '../constant'

export default function countReducer(preState=initState,action) {
    // 在action对象中 获取type和data
    const {type,data} = action
    console.log(data)
    switch(type){
        case JIAN_PERSON: // 加
            return [data, ...preState];
        default:
            return preState ; 
    }
    
}